Protect x11-specific functions in gtktypefuncs.c
authorMatthias Clasen <mclasen@redhat.com>
Sat, 12 Feb 2011 14:12:36 +0000 (09:12 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 12 Feb 2011 14:12:36 +0000 (09:12 -0500)
This is just a bandaid fix, we really need to systematically collect
type functions for all backends.

gtk/Makefile.am

index fe514890b0381224899943df1e2c5af954a4dd11..c95adb7323d2d3a31529b2773f690812b473134f 100644 (file)
@@ -874,7 +874,7 @@ gtktypefuncs.c: @REBUILD@ stamp-gtktypebuiltins.h $(top_srcdir)/gtk/*.h $(top_sr
          ${CPP} $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-gtfsrc.c | \
          $(GREP) -o '\bg[td]k_[a-zA-Z0-9_]*_get_type\b' | \
          sort | uniq | \
-         $(SED) '{ s/^/*tp++ = /; s/$$/();/; }' > xgen-gtf \
+         $(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; }' > xgen-gtf \
        && cp xgen-gtf $@ && rm -f xgen-gtf
 gtktestutils.c: gtktypefuncs.c